<script type="text/javascript">
    function actualizarTablaConceptos(paginaNro) {
        urlAjax = '<?php echo url_for("conceptos/buscarconceptos") . '?page=' ?>' + paginaNro + '&nombre=' + $('#nombre').val()+ '&apellido=' + $('#apellido').val();
        jQuery("#listadoConceptos").load(urlAjax);
    }

</script> 
<?php if (count($conceptos) != 0): ?>
<table  width="100%" class="fuente8" >
  <thead>
   <tr>
       <th>C&oacute;digo</th>
      <th>Nombre</th>
      <th>Tipo</th>
      <th>Cuenta</th>
      <th>Valor</th>
      <th>Activo</th>
      <th colspan="3">Acci&oacute;n</th>
  
    </tr>
         <tbody id="lineaResultado">

                <?php
                $contador = 0;
                foreach ($conceptos as $concepto):
                    if ($contador % 2) {
                        $fondolinea = "itemParTabla";
                    } else {
                        $fondolinea = "itemImparTabla";
                    }
                    ?><tr class="<?php echo $fondolinea ?>">
                          <td><?php echo $concepto->getCodigo() ?></td>
                          <td><?php echo $concepto->getNombre() ?></td>
                         <td align="center"><?php echo $concepto->getTipo() ?></td>
                         <td align="center"><?php echo $concepto->getCuenta() ?></td>
                         <td align="right"><?php echo $concepto->getValor() ?></td>
                        <td align="center"><?php echo $concepto->getActivo() ?></td>
                  <td class="centrado" width="20px">
                    <a href="<?php echo url_for('concepto/show?id='.$concepto->getId()) ?>"><img title="Ver" src="/images/ver.png"></a>
                   </td>
      <td class="centrado"width="20px">
                 <a href="<?php echo url_for('concepto/edit?id='.$concepto->getId()) ?>"><img title="Modificar" src="/images/modificar.png"></a>
      </td>
      <td class="centrado"width="20px">
                 <a href="<?php echo url_for('concepto/eliminar?id='.$concepto->getId()) ?>"><img title="Eliminar" src="/images/eliminar.png"></a>
      </td>
    </tr>
     <?php  $contador++; endforeach; ?>
  </tbody>

</table>
  <?php if ($conceptos->haveToPaginate()): ?>
            <div class="pagination">
                <?php echo link_to_function(image_tag("first.png", "alt=&laquo;"), "actualizarTablaConceptos(" . $conceptos->getFirstPage() . ");") ?>
                <?php echo link_to_function(image_tag("previous.png", "alt=&lt;"), "actualizarTablaConceptos(" . $conceptos->getPreviousPage() . ");") ?>
                <span>
                    <?php
                    $links = $conceptos->getLinks(5);
                    foreach ($links as $page):
                        ?>
                        <?php echo ($page == $conceptos->getPage()) ? $page : link_to_function($page, "actualizarTablaConceptos(" . $page . ");") ?>
                        <?php ($page != $conceptos->getCurrentMaxLink()) ? " - " : ""; ?>
                <?php endforeach ?>
                </span>
                <?php echo link_to_function(image_tag("next.png", "alt=&lt;"), "actualizarTablaConceptos(" . $conceptos->getNextPage() . ");") ?>
        <?php echo link_to_function(image_tag("last.png", "alt=&lt;"), "actualizarTablaConceptos(" . $conceptos->getLastPage() . ");") ?>

            </div>
    <?php endif; ?>
        <div class="pagination_descMant">
            Total: <strong><?php echo $conceptos->getNbResults() ?></strong>
            <?php if ($conceptos->haveToPaginate()): ?>
                - pagina <strong><?php echo $conceptos->getPage() ?>/<?php echo $conceptos->getLastPage() ?></strong>
        <?php endif; ?>
        </div>
        <?php else: ?>
        <div class="errorLogin">
           <?php echo '<span style="margin-top:5px">No existen calles.</span>'; ?>
        </div>
<?php endif; ?>
